#pragma once
#include"RBtree.h"
#include<iostream>
using namespace std;
namespace byte {
	template<class K,class T>
	class mymap{
	public:
		struct keyoft
		{
			const K& operator()(const pair<K,T>&key)
			{
				return key.first;
			}
		};
		bool insert(const pair <K, T>& data)
		{
			return rbt.insert(data);
		}
		void isbalance()
		{
			rbt.IsBalance();
		}

		typedef typename RBtree<K, pair<K, T>, keyoft>::iterator iterator;
		iterator begin()
		{
			return rbt.begin();
		}

		iterator end()
		{
			return rbt.end();
		}

	private:
		clzyf::RBtree<K, pair<K,T>, keyoft> rbt;
	};
}